/******************************************************************************
 * LedController
 *
 * Description:
 *  This class controls the LEDs, which report the status of the program.
 *  Error codes include in appropiate commands, nested loop, end of 
 *  instructions, and paused program. The data ports (B) are utilized to
 *  control the LED states. LED states are determined by outputing certain 
 *  digital high and low values to the data port.
 *
 * 
 * Authors:
 *  Russell Martin (11/7/11)
 *  James O Donoghue (11/6/11)
 *
 *****************************************************************************/

#include "LedController.h"

// LED constants
#define INIT_LED_VALUE (0x7F) 

// Initializes LED settings
//--------------------------------------------------------------       
void InitializeLED(void)
{  
  // Set direction of port B
  // Pin 7 is input
  // Pins 6-0 is output
  // 6-5 are ack bits
  // 3-0 are LEDs
  DDRB = INIT_LED_VALUE;
}

// This method accesses the port T data ports and writes the
// 8-bit binary number to the LED displays.
// 
// Parameters:  lights    the binary code to display on LEDs 
//--------------------------------------------------------------
void DisplayLED(UINT8 lights) 
{
  PORTB = lights;
}

